<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@include file="/include/public.jspf"%>
<% 
	String path = request.getContextPath();
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no">
<script type="text/javascript" src="${path }/js/jquery1.10.2.min.js"></script>
<script type="text/javascript" src="${path }/js/helper.js"></script>
<link type="text/css" href="<%=path %>/page/shareredpacket/css/css.css" rel="stylesheet" />
<title>红包详情</title>
<script type="text/javascript">
	function dosubmit() {
		var validataMobile=Helper.validata.validataMobile($("#mobile").val());
		if(validataMobile){
			Helper.message(validataMobile);
			return false;
		}
		$("#myform").submit();
	}
</script>
</head>
<body>
<form id="myform" action="<%=path%>/activityCore/doGetRedPacket.htm">
	<input type="hidden" name="hostRedPacketId" value="${hostRedPacket.id }"/>
	<input type="hidden" name="rewardId" value="${reward.id}"/>
	<input type="hidden" name="rewardVal" value="${reward.rewardVal }"/>
	<div class="topbg">
	    <c:choose>
	    	<c:when test="${res eq 'success'}"><!--抢红包成功  -->
	    		<div class="money">￥${rewardVal/100 }</div>
	    		<div id="share_res" style="display:block;">
				    <div class="shouji_int text">
				    	红包${rewardVal/100} 元已返至您的${mobile}账户内，<br />请登录魔环金融客户端查看。
				    </div>
				    <a class="now_lq cont" href="${h5domain }/user/login/index.jsp">马上查看</a>
			    </div>
	    	</c:when>
	    	<c:when test="${res eq 'error'}"><!--抢红包失败  -->
	    		<div class="money">￥${rewardVal/100 }</div>
	    		<div id="share_res" style="display:block;">
				    <div class="shouji_int text">
				    	亲,你手慢了,红包已经被抢光了,下次动作快点哦。
				    </div>
			    </div>
	    	</c:when>
	    	<c:when test="${res eq 'full'}"><!--达到5次  -->
	    		<div class="money">￥${rewardVal/100 }</div>
	    		<div id="share_res" style="display:block;">
				    <div class="shouji_int text">
				    	亲,您今天领取的次数已用完。
				    </div>
			    </div>
	    	</c:when>
	    	<c:otherwise><!--初始进入  -->
	    		<div class="money">￥${reward.rewardVal/100 }</div>
	    		<div id="share_do" style="display:block;">
			    	<div class="shouji_int"><input class="yahei" name="mobile" id="mobile" type="tel" placeholder="请输入您的手机号码" /></div>
			    	<a class="now_lq" href="javascript:void(0);" onclick="dosubmit()">马上领取</a>
			    	<div class="t_c"></div>
			    	<a class="now_dl" href="#">下载魔环金融客户端</a>
			    </div>
	    	</c:otherwise>
	    </c:choose>
	</div>
</form>
<div class=" Position_relative">
  <div class="Position_absolute_no hdgz"><span><i></i>活动规则</span></div>
</div>
<div class="hd_cont">
<p>1.下载魔环金融APP，用手机号码注册且将账户与手机号码绑定。</p>
<p>2.使用红包的下单手机号需与领取红包的手机号一致。</p>
<p>3.最终活动解释权归魔环金融所有。</p>
</div>
<div class="clearfix"></div>
<div style="height:80px;"></div>
<div class="mask"><a class="dl_app_bt r" href="#">下载客户端</a></div>
</body>
</html>